import * as lib from "./tween_lib"
export default class Tween{
  constructor(){
    this.lib = lib
    this.lib.autoPlay(true)
    this.easing = lib.Easing
  }
  newTween(last,obj,target,easing,func){
    var n = easing.split(".")
    var tween = new this.lib.Tween(obj)
    .to(target,last)
    .easing(this.easing[n[0]][n[1]])
    .on("complete",func)
    .start()
  }
}